﻿''' <summary>
''' Provides a container for various HUD elements which maintains its own z-order and can be enabled/disabled through its Visible property.
''' </summary>
''' <remarks></remarks>
Public Class HudLayer
    Public Property Visible As Boolean = True
    Public Property ZOrder As Integer

    Private _Images As New List(Of HudImage)
    Public ReadOnly Property Images As List(Of HudImage)
        Get
            Return _Images
        End Get
    End Property

    Private _Labels As New List(Of HudLabel)
    Public ReadOnly Property Labels As List(Of HudLabel)
        Get
            Return _Labels
        End Get
    End Property

    Private _Shapes As New List(Of GdiShape)
    Public ReadOnly Property Shapes As List(Of GdiShape)
        Get
            Return _Shapes
        End Get
    End Property

    Private _GenericObjects As New List(Of GameObject)
    Public ReadOnly Property GenericObjects As List(Of GameObject)
        Get
            Return _GenericObjects
        End Get
    End Property

    Public Function GetElements() As GameObject()
        Dim result As New GameObjectCollection
        result.AddRange(_Images)
        result.AddRange(_Labels)
        result.AddRange(_Shapes)
        result.AddRange(_GenericObjects)
        Return result.ToZOrderedArray
    End Function
End Class
